/*
 * @(#)cn.design.pattern.observe 2020/4/26/0026
 *
 * Copy Right@ 人人译视界
 */


package cn.design.pattern.observe;

/**
 * <pre>
 * @author tuwei
 *
 * @version 0.9
 *
 * 修改版本: 0.9
 * 修改日期: 2020/4/26/0026
 * 修改人 :  tuwei
 * 修改说明: 初步完成
 * 复审人 ：
 * </pre>
 */
public class CurrentConditions implements Observer {
	private float temperature;
	private float pressure;
	private float humidity;

	public void update (float temperature, float pressure, float humidity) {
		this.temperature = temperature;
		this.pressure = pressure;
		this.humidity = humidity;
		display();
	}

	private void display() {
		System.out.println("***Today temperature:" + temperature);
		System.out.println("***Today pressure:" + pressure);
		System.out.println("***Today humidity:" + humidity);
	}
}
